package com.yykj.prescription.client.feign;

import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.yykj.common.vo.ResultVO;
import com.yykj.prescription.client.dto.*;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient(name = "prescription-server")
public interface PrescriptionFeignClient {
    @GetMapping("/api/prescription/info/{prescriptionId}")
    public ResultVO<PrescriptionDetailDTO> prescriptionInfo(@PathVariable String prescriptionId);


    @ApiOperation("处方温馨提示 -- 列表")
    @GetMapping("/api/prescription/list/tips/{hospitalId}")
    public ResultVO<List<PrescriptionTipsDTO>> listHospitalPrescriptionTips(@PathVariable Integer hospitalId);

    @GetMapping("/api/prescription/setting/view/{hospitalId}")
    @ApiOperation("处方设置 -- 查看")
    public ResultVO<PrescriptionSettingDTO> viewPrescriptionSetting(@PathVariable Integer hospitalId);

    @GetMapping("/member/setting/list/{hospitalId}")
    @ApiOperation("人员设置 -- 列表")
    public ResultVO<List<PrescriptionCheckMemberDTO>> listPrescriptionCheckMember(@PathVariable Integer hospitalId) ;

    @PostMapping("/api/prescription/user/check")
    public ResultVO checkPrescription(@RequestBody PrescriptionCheckDTO checkDTO);


    @PostMapping("/api/prescription//create")
    @ApiOperation("处方 -- 新建")
    public ResultVO<String> createPrescription(@RequestBody PrescriptionCreateDTO createDTO);


    @GetMapping("/api/prescription/client/order/check/{prescriptionId}")
    @ApiOperation("处方下单检查")
    public ResultVO<PrescriptionOrderCheckResultDTO> checkPrescriptionOrder(@PathVariable String prescriptionId);
}
